/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2022/12/8 11:09
 * @copyright: 博为峰
 */
public class Demo02 {
    public static void main(String[] args) {
        /*
          算术运算符 + - * / % ++ --
        */
        int a = 6;
        byte b = 9; //隐式转换

        a = a + b; //隐式转换，把b转成int类型，再和a做运算，运算结果是int类型，再赋值给int类型变量

        b = (byte) (b + 10);  //强制类型转换

        long l = 20; //自动类型提升

        double d = 3.14;

        float f = (float) d;//强制类型转换

        int c = 1024;

        c = c / 1000 * 1000;

        System.out.println("c = " + c);//1000

    }
}
